/**
 * 
 */
package com.lehecai.core.lottery;

import com.lehecai.core.IntegerBeanLabelItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;

/**
 * @author qatang
 * 退票订单状态
 */
public class RefundPlanOrderStatus extends IntegerBeanLabelItem {

	private static final long serialVersionUID = -7267192526056695321L;

	private static final Logger logger = LoggerFactory.getLogger(RefundPlanOrderStatus.class.getName());

	private static List<RefundPlanOrderStatus> items = new ArrayList<RefundPlanOrderStatus>();

	protected RefundPlanOrderStatus(String name, int value) {
		super(RefundPlanOrderStatus.class.getName(), name, value);
		items.add(this);
	}
	
	public static RefundPlanOrderStatus getItem(int value){
		try {
			return (RefundPlanOrderStatus) RefundPlanOrderStatus.getResult(RefundPlanOrderStatus.class.getName(), value);
		} catch (Exception e) {
			logger.error(e.getMessage(), e);
			return null;
		}
	}
	
	public static List<RefundPlanOrderStatus> getItems() {
		return items;
	}

	public static final RefundPlanOrderStatus ALL = new RefundPlanOrderStatus("全部", -1);

	public static final RefundPlanOrderStatus PENDING = new RefundPlanOrderStatus("待退款", 0);
	public static final RefundPlanOrderStatus REFUNDED = new RefundPlanOrderStatus("已退款", 1);
}
